<template>
  <div class="homeData flex m-15 bg-white p-15 col-center">
    <van-row
      class="w100"
      align="center"
      :justify="showImg ? 'start' : 'space-around'"
      :gutter="20"
    >
      <van-col span="4" v-if="showImg"
        ><!-- 图片 -->
        <img v-if="homeData.houseImage" :src="'http://192.168.3.63:8085'+homeData.houseImage[0]" alt=""
      />
      <img v-else src="../../assets/image/home/newHome.png" alt=""
      />
    </van-col>
      <van-col :span="showImg ? 14 : 18">
        <!-- 信息 -->
        <div class="infoList">
          <div class="title font-17 mb-5">{{homeData.houseName ||homeData.houseAddress || homeData.type ||homeData.place ||homeData.title||homeData.name|| '暂无数据'}}</div>
          <div class="tags brift mb-5" v-if="homeData.houseType">
            <van-tag class="mr-10 font-12">{{homeData.houseType}}</van-tag>
            <van-tag class="mr-10 font-12">{{homeData.payWay || ''}}</van-tag>
            <van-tag v-if="homeData.area" class="mr-10 font-12">{{homeData.area + 'm²' }}</van-tag>
          </div>
          <div class="brift font-12">{{homeData.address ||homeData.context  ||homeData.homeAddress|| '暂无数据' || homeData.brand}}</div>
          <div class="brift font-12 mt-5">{{homeData.time || homeData.brand}}</div>
          <div v-if="homeData.money || homeData.price" class="brift font-18">
            <span style="color: #F2724E;font-family: 思源黑体;">{{homeData.money || homeData.price || '暂无数据'}}</span>
            <span v-if="homeData.money" class="brift font-12" style="margin-left: 5px;">元/月</span>
          </div>
        </div>
      </van-col>

      <van-col span="6" v-if="homeData.current">
        <van-tag :type="homeData.current == '审核通过'?'success':'warning'">{{homeData.current}}</van-tag>
      </van-col>

      <van-col span="6" v-if="homeData.handle">
        <van-tag :type="homeData.handle == '已处理'?'success':'warning'">{{homeData.handle}}</van-tag>
      </van-col>

      <van-col span="6" v-if="homeData.isOut">
        <van-tag :type="homeData.isOut == 'Y'?'success':'warning'">{{homeData.isOut == 'N' ? '待出租':'出租'}}</van-tag>
      </van-col>

      <van-col span="6">
        <span class="font-12 "> {{ homeData.telphone }}</span>
      </van-col>
    </van-row>
  </div>
</template>

<script setup>
import { ref, defineProps } from "vue";
const props = defineProps({
  showImg: {
    type: Boolean,
    default: true,
  },
  homeData:{
    type:Object,
    default:{

    }
  }
})

</script>

<style lang="scss" scoped>
.homeData {
  border-radius: 10px;
  img {
    width: 46px;
    height: 46px;
  }
  .brift {
    color: #666666;
  }
}
</style>